package tour.spring.bc.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;

@Entity
@DiscriminatorValue("R")
public class Region extends Place{

//	protected Long id;
	private List<City> cities;

	@OneToMany(mappedBy="region", cascade = CascadeType.ALL)
	public List<City> getCities() {
		return cities;
	}

	public void setCities(List<City> cities) {
		this.cities = cities;
	}
	
//	@Column
//	@Id
//	@SequenceGenerator(name="region_seq", sequenceName="region_seq")
//	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator="region_seq")
//	public Long getId() {
//		return id;
//	}
//
//	public void setId(Long id) {
//		this.id = id;
//	}	
	
}